1. Field of the Invention
The present invention relates to a method and apparatus for recognizing components, and more particularly to a method and apparatus for recognizing components in which electrodes of an electronic component are determined to be positioned on a image coordinate system in an electronic component surface mounting machine or the like.
2. Description of the Prior Art
In electronic component surface mounting machines, a component is generally picked up by a vacuum nozzle at component supply stations and placed on a printed circuit board. Since the component is not always picked up in a correct state by the vacuum nozzle, the picked-up component is usually imaged by a CCD camera and recognized. If the component is not picked up in a correct state, both angular and coordinate positions are corrected based on the recognized data.
FIG. 1 illustrates a conventional method of recognizing components. FIG. 1(A) is an image of a bottom surface 1 of a BGA (Ball Grid Array) type IC, the image being captured by reflected light from an electrode side, showing a plurality of ball electrodes 1a, 1b, 1c, - - - . FIG. 1(B) is an image of a leaded component such as a connector, PLCC (Plastic Leaded Chip Carrier) or the like, showing lead pins 2a, 2b, 2c, - - - mounted on a body 2. An input image is represented by brightness levels, and pixel positions are designated on an XY coordinate system. Since the electrode patterns and dimensions of components are previously known, the image is generally accessed limited, for speeding up image processing, to a search area 1xe2x80x2 or 2xe2x80x2 in FIG. 1 defined in the image so as to enclose an electrode set, including both of the coordinate and angular deviations of an absorbed position by the vacuum nozzle.
In FIG. 1(A), the image is scanned in a horizontal (X) direction within the search area 1xe2x80x2. With pixel values, namely brightness, obtained by the scanning being represented at Z-axis, a brightness diagram is obtained as shown in FIG. 1(C). Lines a, b and c in FIG. 1(C) correspond to the scanning lines a, b and c on the image in FIG. 1(A). Since the periodic distance T between peaks on the diagram equals that between the electrodes, the scanning line c means that it runs across an electrode array. The X coordinate of the electrode 1a is x0 corresponding to that of the peak on the line b in FIG. 1(C), and a Y coordinate y0 can be calculated by interpolating the Y coordinates of the lines b and c. Coordinates of the other electrodes are similarly figured out successively. As to the scanning direction, it may be possible to scan in a vertical direction or in 45xc2x0 slant direction, in addition to the horizontal scanning, so as to increase the reliability of detected positions.
In case of a leaded component shown in FIG. 1(B), scanning the image creates waveforms corresponding to a lead alignment having the same periodic distance as that of lead pins. Therefore, top end coordinates of the lead pins 2a, 2b, 2c, - - - can be calculated by applying the same process as in the BGA case.
However, in the conventional method of recognizing components, there exist some types of components that are difficult or impossible to recognize, because the method depends on brightness values that the scanning lines output. FIG. 2 illustrates some examples. FIG. 2(A) shows a BGA component 3 which includes obstructions such as an outer frame 3a, spurious electrodes 3b, a body 3c contaminated with noise, structure parts 3d, and printed patterns 3e. When this BGA component 3 is imaged, the brightness of the above-described obstructions is sometimes higher than that of the target electrodes, which makes the recognition of the electrodes impossible because of output waveforms from these obstacles if the conventional scanning method is employed.
FIG. 2(B) shows an example of leaded components often seen in connectors. A body 4 has height-level difference 4a, and locking metals 4b. In an image of the leaded component, brightness of the level difference 4a and the metals 4b is sometimes higher than that of target pins. Here, at the upper step, the locking metals 4b are captured together with the target pins when the conventional scanning method is employed, which makes difficult the detection of the lead pins. And at the lower step, brightness of the level difference 4a is not uniform, which also makes difficult the judgment whether the lead pins are real ones.
FIG. 2(C) shows a BGA component 5. This is also difficult to recognize with the use of the conventional method, even though only electrodes 5a are clearly obtained in a picture. Due to a cross alignment of electrodes, only one first peak on a waveform is detected even if the picture is scanned in horizontal, vertical or 45xc2x0 directions (even 45xc2x0 scanning produces only one peak because the component is usually positioned slightly on a slant), which makes it impossible to apply image processing depending on the detection of periodic peaks. Therefore, for positioning such a component as shown in FIG. 2(C), image processing specialized for the electrode pattern must be practically employed. Furthermore, the problem of the above-mentioned method is that it takes long processing time, which results in long cycle time of mounting components, because scanning of the image requires long processing time proportional to the number of pixels within a whole image area or a part of area.
When applying the conventional recognition method described above, there exist certain components that are difficult or impossible to recognize. For precise recognition there is needed severe lighting/imaging conditions, which results in high cost of apparatus and long image processing time.
For solving the above-described problems, it is an object of the invention to provide a method and apparatus for recognizing components, in which a wide variety of components are recognized precisely with moderate illuminating conditions in less image processing time.
In order to solve the problems mentioned above, the invention provides for a method and apparatus for recognizing electronic components. In a method for recognizing electrode positions from an image of a component having a predetermined array of electrode pattern, the invention comprises the steps of extracting electrodes with a proper size of small window (hereinafter xe2x80x9cwindowxe2x80x9d) set in serial order inside the captured image of the component, the window including one electrode, obtaining an extracted electrode pattern and coordinates of the electrodes, collating the extracted electrode pattern with the predetermined electrode pattern by overlaying with each other, and determining image coordinates of the electrodes with respect to the predetermined electrode pattern based on the collated result.
In an apparatus for recognizing electrode positions from an image of a component having a given array of electrode pattern, the invention comprises means for placing a proper size of window in serial order inside the captured image of the component, the window including one electrode, means for extracting electrodes through the window, means for producing an extracted electrode pattern, means for calculating coordinates of the electrodes, means for collating the extracted electrode pattern with the given electrode pattern by overlaying with each other, and means for determining image coordinates of the electrodes with respect to the given electrode pattern based on the collated result.
In this invention, a component having a given array of electrode pattern is imaged, and a core electrode is extracted by sweeping the captured image through a window from a proper corner. After detecting the core electrode, an electrode map coordinate system H0V0 is implemented with the core electrode set as its origin, and the process proceeds to a state capable of observing its neighbor electrodes. In this state, a window is placed at an area predicted from an extracted electrode or an electrode group, and electrodes are extracted in succession. In this manner, an extracted electrode pattern and its electrode coordinates are obtained. Then the extracted electrode pattern is collated with the given array of electrode pattern (a logical or defined electrode pattern) by overlaying with each other, and electrode positions are determined on the electrode map coordinate system. When the mismatch between both patterns (the extracted electrode pattern and the given pattern) becomes minimum, that is, both patterns match most with each other, the image coordinates of the electrodes relative to the given array of electrode pattern are determined from the coordinates of the extracted electrodes. With such arrangement, electrodes are extracted in high speed, and accurate electrode coordinates are determined because the extracted electrode pattern is collated with the given array of electrode pattern.